<?php


namespace api\common\model;


use think\Model;

class RlEtCustInstalRelModel extends Model
{

    protected $pk = 'et_cust_instal_rel_id';
    protected $autoWriteTimestamp = true;
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';
    protected static $instance;
    //通用条件
    protected static $commonWhere=[
        'flag'=>1
    ];
    //传值条件
    private  static $queryWhere;
    //执行语句条件
/*    public function __construct(){
        //执行语句  条件生成
       self::$queryWhere= $where=array_merge(self::$queryWhere,self::$commonWhere);
       //model对象初始化
        if(!self::$instance){
            self::$instance=new self();
        }
    }*/
    /*
     * remark 获取单个结果集
     * return  单个结果集/empty
     * */
   public static function instalRelFind(){
       $res=self::$instance->where(self::$queryWhere)->find();
       return $res;
   }
}